import child from "<child>";

<let/tagName = child/>

<button onClick() { tagName = tagName === child ? "div" : child } />

<${tagName} id="dynamic" />